package org.feng.namesbean;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import org.feng.businessbean.MyBean;
import org.feng.common.BeanBusiness;
import org.feng.common.BusinessOneEnum;
import org.feng.common.BusinessTwoEnum;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.stereotype.Component;

/**
 * TODO 类的描述
 *
 * @version V1.0
 * @author: fengjinsong
 * @date: 2022年07月01日 17时52分
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Component
@Slf4j
@BeanBusiness(one = BusinessOneEnum.ONE_TEST1, two = BusinessTwoEnum.TWO_TEST2)
public class NameBean extends MyBean implements BeanNameAware {

    private String beanName;

    @Override
    public void setBeanName(String name) {
        this.beanName = name;
        log.info("NameBean 的自定义beanName={} 当前对象={}", beanName, this);
    }
}
